//
//  MDMyCarInfoTableViewCell.m
//  OneCreditTreasure
//
//  Created by iOS Tedu on 16/8/30.
//
//

#import "MDMyCarInfoTableViewCell.h"

@implementation MDMyCarInfoTableViewCell
#pragma mark - 生命周期 life cycle
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

#pragma mark - 懒加载 lazy loading
- (UILabel *)carNameLB {
    if(_carNameLB == nil) {
        _carNameLB = [[UILabel alloc] init];
        [self.contentView addSubview:_carNameLB];
        [_carNameLB mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(30 * AUTO_WIDTH);
            make.top.equalTo(15 * AUTO_WIDTH);
            make.width.lessThanOrEqualTo(kScreenW / 2);
            make.right.equalTo(self.carPlateNumLB.mas_left).equalTo(-8);
        }];
        _carNameLB.font = [UIFont systemFontOfSize:15 * AUTO_WIDTH];
    }
    return _carNameLB;
}

- (UILabel *)carPlateNumLB {
    if(_carPlateNumLB == nil) {
        _carPlateNumLB = [[UILabel alloc] init];
        [self.contentView addSubview:_carPlateNumLB];
        [_carPlateNumLB mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(kScreenW / 2);
            make.topMargin.equalTo(self.carNameLB.mas_topMargin).equalTo(0);
            make.right.equalTo(-15);
        }];
        _carPlateNumLB.font = [UIFont systemFontOfSize:15 * AUTO_WIDTH];
    }
    return _carPlateNumLB;
}

- (UILabel *)carFrameNumLB {
    if(_carFrameNumLB == nil) {
        _carFrameNumLB = [[UILabel alloc] init];
        [self.contentView addSubview:_carFrameNumLB];
        [_carFrameNumLB mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leftMargin.equalTo(self.carNameLB.mas_leftMargin).equalTo(0);
            make.top.equalTo(self.carNameLB.mas_bottom).equalTo(12 * AUTO_WIDTH);
            make.bottom.equalTo(-15 * AUTO_WIDTH);
            make.right.equalTo(self.carEngineNumLB.mas_left).equalTo(-8);
        }];
        _carFrameNumLB.font = [UIFont systemFontOfSize:15 * AUTO_WIDTH];
    }
    return _carFrameNumLB;
}

- (UILabel *)carEngineNumLB {
    if(_carEngineNumLB == nil) {
        _carEngineNumLB = [[UILabel alloc] init];
        [self.contentView addSubview:_carEngineNumLB];
        [_carEngineNumLB mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leftMargin.equalTo(self.carPlateNumLB.mas_leftMargin).equalTo(0);
            make.topMargin.equalTo(self.carFrameNumLB.mas_topMargin).equalTo(0);
            make.bottomMargin.equalTo(self.carFrameNumLB.mas_bottomMargin).equalTo(0);
            make.right.equalTo(-15);
        }];
        _carEngineNumLB.font = [UIFont systemFontOfSize:15 * AUTO_WIDTH];
    }
    return _carEngineNumLB;
}

@end
